package exercises.innerclasses;

/**
 * @author: liuchong
 * @create: 2023/3/28 16:30
 * @description:
 */
interface Ex9interface {
    void say();
}
public class Ex9 {
    Ex9interface f() {
        class inner implements Ex9interface{
            public void say() {
                System.out.println("hello");
            }
        }
        return new inner();
    }
    public static void main(String[] args) {
        Ex9 ex9 = new Ex9();
        ex9.f().say();
    }
}
